/* 摄影摄像部分懒加载页面所使用的js
 * @author 王校兵
 * @date 2016-7-20
 * @version 1.0
 */


function paintingphotographScrollDownJs(scrollLength){
	if (scrollLength >700 && scrollLength < 1300
			&& !photograph_floor_state[0]) {
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030301",
			toPosition : "2030341"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var html = combinFortyArtist(product);
			$("#writing_tuijie").html(html);
			
			var ad_html = combineBottomAdTwo(product[40]);
			$("#writing_tuijie_ad").html(ad_html);
		}, "json");

		photograph_floor_state[0] = true;
	} else if (scrollLength > 1300 && scrollLength < 2000
			&& !photograph_floor_state[1]) {
		//创建右侧标题数组  
		var title = ["公益摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030401",
			toPosition : "2030412",
			newsToPosition : "2030409"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("1F", title, product, "论坛/", data.news);
			$("#writing_kaishu").html(goods_html);
			alert(goods_html);

			//拼接广告区域
			var ad_html = combineBottomAdOne(product[9], product[10], product[11]);
			$("#writing_kaishu_ad").html(ad_html);

		}, "json");

		photograph_floor_state[1] = true;
	} else if (scrollLength > 2000 && scrollLength < 2700
			&& !photograph_floor_state[2]) {
		//创建右侧标题数组  
		var title = ["风光摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030501",
			toPosition : "2030519",
			newsToPosition : "2030509"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("2F", title, product, "论坛/", data.news);
			$("#writing_xingshu").html(goods_html);
			
			//拼接广告区域
			var ad_html = combinTenArtist(product);
			$("#writing_xingshu_ad").html(ad_html);

		}, "json");

		photograph_floor_state[2] = true;
	}else if (scrollLength > 2700 && scrollLength < 3400
			&& !photograph_floor_state[3]) {
		//创建右侧标题数组  
		var title = ["人像摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030601",
			toPosition : "2030612",
			newsToPosition : "2030609"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("3F", title, product, "论坛/", data.news);
			$("#writing_caoshu").html(goods_html);
			
			//拼接广告区域
			var ad_html = combineBottomAdOne(product[9], product[10], product[11]);
			$("#writing_caoshu_ad").html(ad_html);

		}, "json");

		photograph_floor_state[3] = true;
	}else if (scrollLength > 3400 && scrollLength < 4100
			&& !photograph_floor_state[4]) {
		//创建右侧标题数组  
		var title = ["纪实摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030701",
			toPosition : "2030719",
			newsToPosition : "2030709"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("4F", title, product, "论坛/", data.news);
			$("#writing_lishu").html(goods_html);
			
			//拼接广告区域
			var ad_html = combinTenArtist(product);
			$("#writing_lishu_ad").html(ad_html);

		}, "json");

		photograph_floor_state[4] = true;
	}else if (scrollLength > 4100 && scrollLength < 4800
			&& !photograph_floor_state[5]) {
		//创建右侧标题数组  
		var title = ["商业摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030801",
			toPosition : "2030810",
			newsToPosition : "2030809"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("5F", title, product, "论坛/", data.news);
			$("#writing_zhuanshu").html(goods_html);
			
			//拼接广告区域
			var ad_html = combineBottomAdTwo(product[9]);
			$("#writing_zhuanshu_ad").html(ad_html);

		}, "json");

		photograph_floor_state[5] = true;
	}else if (scrollLength > 4800 && scrollLength < 5500
			&& !photograph_floor_state[6]) {
		//创建右侧标题数组  
		var title = ["生态摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2030901",
			toPosition : "2030912",
			newsToPosition : "2030909"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("6F", title, product, "论坛/", data.news);
			$("#writing_weibei").html(goods_html);
			
			//拼接广告区域
			var ad_html = combineBottomAdOne(product[9], product[10], product[11]);
			$("#writing_weibei_ad").html(ad_html);

		}, "json");

		photograph_floor_state[6] = true;
	}else if (scrollLength > 5500 && scrollLength < 6200
			&& !photograph_floor_state[7]) {
		//创建右侧标题数组  
		var title = ["艺术摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2031001",
			toPosition : "2031019",
			newsToPosition : "2031009"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("7F", title, product, "论坛/", data.news);
			$("#writing_yingbishufa").html(goods_html);
			
			//拼接广告区域
			var ad_html = combinTenArtist(product);
			$("#writing_yingbishufa_ad").html(ad_html);

		}, "json");

		photograph_floor_state[7] = true;
	}else if (scrollLength > 6200 && scrollLength < 6900
			&& !photograph_floor_state[8]) {
		//创建右侧标题数组  
		var title = ["娱乐摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2031101",
			toPosition : "2031112",
			newsToPosition : "2031109"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("8F", title, product, "论坛/", data.news);
			$("#writing_qita").html(goods_html);
			
			//拼接广告区域
			var ad_html = combineBottomAdOne(product[9], product[10], product[11]);
			$("#writing_qita_ad").html(ad_html);

		}, "json");

		photograph_floor_state[8] = true;
	}else if (scrollLength > 6900 && scrollLength < 7600
			&& !photograph_floor_state[9]) {
		//创建右侧标题数组  
		var title = [" 视觉日记摄影"];
		$.post("indexProduct", {
			page : "203",
			fromPosition : "2031201",
			toPosition : "2031209",
			newsToPosition : "2031209"
		}, function(data, status) {
			var product = data.pictureAndProduct;
			//拼接商品区域的html
			var goods_html = combinPaintingGoods("9F", title, product, "论坛/", data.news);
			$("#writing_shuhuayongpin").html(goods_html);
			
		}, "json");

		photograph_floor_state[9] = true;
	}
}